/**
 * 
 * 
 * @class NG.command.GetCategories
 * @extends Ext.util.Observable
 */
NG.command.GetCategories = Ext.extend(NG.command.Request, {
	
	bbox: "",
	
	width: 800,
	
	height: 800,
	
	/**
	 * Used for obtaining xml data for<br>
	 * requesting categories according to class members
	 * 
	 * @return {String} formed xml structure
	 */
	getDataXML: function(){
    	var XML = new XMLWriter();
    	XML.BeginNode(NG.constants.GetCategories.XML_getcategories);
        	XML.Node(NG.constants.GetMap.XML_BBOX, this.bbox);
        	XML.Node(NG.constants.GetMap.XML_Width, this.width);
        	XML.Node(NG.constants.GetMap.XML_Height, this.height);
    	XML.EndNode();
    	XML.Close();
    	return XML.ToString();		
	},
	
	/**
	 * Each request class has a response <br>
	 * Response object can be obtained over related request object
	 * 
	 * @param {String} xmlData - unparsed response data according to request
	 * return {NG.response.GetCategories} response object related with request
	 */
	getResponse: function(xmlData){
		return new NG.response.GetCategories({
			xmlData: xmlData
		});	
	},
		
	constructor: function(config){
		config = config || {};
		config.serviceName = XSN_WEBGIS_GETCATEGORIES;
		config.showLoading = false;
		NG.command.GetCategories.superclass.constructor.call(this, config);
	}
});

NGGetCategories = NG.command.GetCategories;